import home from "view/home.art"
import headerView from "view/header.art"
import { channelsApi } from "api/home.js"
import { cityApi } from "api/city.js"
import { searchApi } from "api/search.js"

class Home {
    constructor() {


        this.sortData = {
            pageNo: 1,
            cityCode: 0,
            showTime: 7
        }
        this.citydata();
        
    }
    init() {
        
    }
    citydata() {
        // if (!window.localStorage.cityid) {
        //     let data = { type: "number", data: 0 };
        //     data = JSON.stringify(data);
        //     localStorage.setItem("cityid", data)
        // }
        
        this.getData();
    }
    async getData() {
        let city = JSON.parse(localStorage.cityid).data;
        this.sortData.cityCode = city;
        console.log(22222,)
        var listdata=await channelsApi(this.sortData);
        console.log(listdata)
        
    }
    async render() {
        
        console.log(1)
        // var html = home();
        // $("#app").prepend(html);

    }

}
export default new Home()